﻿namespace Sai.Test.Introspection
{
    using Sai.Core;
    using Sai.Core.Introspection;
    using Sai.Test.XUnit;
    using Xunit;

	public class ParameterFacts
	{
		public class TheToCodeMethod
		{
            
            [Fact, InMemoryTest]
            public void System_Namespace_Type_Returns_Only_Adjusted_Type_Info()
            {
                var p = new Parameter(new TypeName(new FullyQualifiedName("System.Int32")));

                SourceCode generated = p.ToCode();

                var content = generated.Content;

                Assert.Equal(1, content.Count);
                Assert.Equal("tn", content[0].Name);
                Assert.Equal("int", content[0].Value);
            }
		}
	}
}
